﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;

namespace TaskScheduler
{
    public partial class NewsCollectorService : ServiceBase
    {
        Scheduler scheduler;
        public NewsCollectorService()
        {
            InitializeComponent();
            scheduler = new Scheduler();
        }
        
        protected override void OnStart(string[] args)
        {
            scheduler.Start();
        }

        protected override void OnStop()
        {
            scheduler.Stop();
        }
        
        protected override void OnPause()
        {
            scheduler.Pause();
        }
        protected override void OnContinue()
        {
            scheduler.Continue();
        }
    }
}
